package org.absolutezero.client.events;

import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.GwtEvent.Type;

public class NavigationChangeEvent extends GwtEvent<NavigationChangeEventHandler>{

	public static Type<NavigationChangeEventHandler> TYPE = new Type<NavigationChangeEventHandler>();
	private NavigationItemSelected item;
	
	public enum NavigationItemSelected{
		SHELF_MY,
		SHELF_BROWSE,
		RECIPE_MATCH,
		RECIPE_BROWSE,
		RECIPE_MY
	}
	
	public NavigationItemSelected getNavigationItemSelected(){
		return item;
	}
	
	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<NavigationChangeEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(NavigationChangeEventHandler handler) {
		handler.onEvent(this);
	}
	
	public NavigationChangeEvent(NavigationItemSelected item){
		this.item = item;
	}
}
